#include <iostream>
#include <string>
#include <set>
#include <sstream>
using namespace std;

set<string> dictionary;
string str, bufstr;

int main() {
  while (cin >> str) {
    int i, strlen = str.length();
    for (i = 0; i < strlen; i++) {
      if (isalpha(str[i])) {
        str[i] = tolower(str[i]);
      }
      else {
        str[i] = ' ';
      }
    }

    stringstream ss(str);
    while (ss >> bufstr) {
      dictionary.insert(bufstr);
    }
  }

  for (set<string>::iterator it = dictionary.begin(); it != dictionary.end(); it++) {
    cout << *it << "\n";
  }

  return 0;
}
